import MUtil from 'util/MUtil.jsx';
const mUtil = new MUtil();
//******************* /10-3/ TODO 15:00
class OrderService {
  getOrderList(listParam) {
    let url = '',
      data = {};
    if (listParam.listType === 'list') {
      url = '/manage/order/list.do';
      data.pageNum = listParam.pageNum;
    } else if (listParam.listType === 'search') {
      url = '/manage/order/search.do'
      data.pageNum = listParam.pageNum;
      data.orderNo = listParam.orderNo;
    }
    return mUtil.request({ type: 'post', url, data });
  }

  getOrderDetail(orderNo) {
    return mUtil.request({ type: 'get', url: '/manage/order/detail.do', data: { orderNo } });
  }

  sendCoods(orderNumber) {
    return mUtil.request({
      type: 'post',
      url: '/manager/order/send_goods.do',
      data: { orderNo: orderNumber }
    });
  }
}

export default OrderService;